package com.ayoka.adapter;

import android.widget.ImageView;

import com.ayoka.R;
import com.ayoka.mvp.CourseQuestionMVP.CourseQuestionModel.CourseQuestionBean;
import com.jcp.baselibrary.brvah.BaseQuickAdapter;
import com.jcp.baselibrary.brvah.BaseViewHolder;
import com.jincp.image.load.ImageLoaderOptions;
import com.jincp.image.load.ImageLoaderProxy;

/**
 * Created by jinchunping on 2018/4/11.
 */

public class CourseQuestionAdapter extends BaseQuickAdapter<CourseQuestionBean, BaseViewHolder> {


    public CourseQuestionAdapter() {
        super(R.layout.item_course_question, null);
    }

    @Override
    protected void convert(final BaseViewHolder holder, CourseQuestionBean item) {
        ImageLoaderProxy.getInstance().displayImage(item.UserInfo.LocalAvatar, (ImageView) holder.getView(R.id.iv_header), ImageLoaderOptions.getCircleOptions());
        holder.setText(R.id.tv_user_name,item.UserInfo.WeixinNickName)
                .setText(R.id.tv_content,item.Content);
    }
}
